# coding=utf-8

"""方法重写"""


class A(object):
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def info(self):
        print(self.name, self.age)


class B(A):
    def __init__(self, name, age, score):
        super().__init__(name, age)
        self.score = score

    def info(self):  # 方法重写
        super().info()
        print('score is', self.score)


class C(A):
    def __init__(self, name, age, no):
        super().__init__(name, age)
        self.no = no


stu1 = B('张三', 22, 22)
stu2 = C('李四', 22, 66)
stu1.info()
stu2.info()
